﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Extenions.DataGridViewSection
{
    public static class DataGridViewControl
    {
        public static void Attribute(this DataGridView dgv)
        {
        }

        public static void RenameColumn(this DataGridView dgv, Dictionary<string,string> dict)
        {
            foreach (KeyValuePair<string, string> pair in dict)
                dgv.Columns[pair.Key].HeaderCell.Value = pair.Value;
        }

        public static void IfInvokeRequired(this DataGridView dgv, Action action)
        {
            if (dgv.InvokeRequired)
                dgv.BeginInvoke(action);
        }

        public static void ReziseColumn(this DataGridView dgv)
        {
        }

        public static void Add()
        {
        }
    }
}
